package cn.magictodo.weblog.common.domain.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <p>
 * 文章标签表与数据库对应
 * </p>
 *
 * @author liu
 * @since 2023-11-22
 */
@Data
@Builder
@ApiModel(value="Tag对象", description="文章标签表")
@TableName("t_tag")
public class TagDO{

    @ApiModelProperty(value = "标签id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "标签名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "最后一次更新时间")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除标志位：0：未删除 1：已删除")
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value = "文章数量")
    @TableField("articles_total")
    private Integer articlesTotal;

    @ApiModelProperty(value = "推送文章数量")
    @TableField("publish_articles_total")
    private Integer publishArticlesTotal;
}
